package com.situ.day722;

import org.junit.Test;

public class toLowerCase {
    @Test
    public void test1(){
        String str = "I Love Java!";
        String newStr = toLowerCase(str);
        System.out.println(newStr);
    }
    public String toLowerCase(String str){
        char[] array = str.toCharArray();
        for (var i = 0; i < array.length; i++) {
            if (array[i] >= 'A' && array[i]<='Z'){
                array[i] = (char) (array[i] + 32);
            }
        }
        return new String(array);
    }
}
